<template>
  <div class="about">
    <el-card shadow="hover">
      <div slot="header" class="card-header">
        <span><i class="el-icon-info"></i> 关于系统</span>
      </div>

      <div class="about-content">
        <h2>图片压缩系统</h2>
        <p class="description">
          一个基于Spring Boot + Vue2 + Element UI构建的现代化图片压缩系统，
          提供前端预览压缩和后端二次压缩的双重保障。
        </p>

        <el-divider></el-divider>

        <h3>功能特性</h3>
        <el-row :gutter="20">
          <el-col :xs="24" :sm="12" :md="8">
            <div class="feature-item">
              <i class="el-icon-picture"></i>
              <h4>前端压缩</h4>
              <p>使用Canvas和CompressorJS进行初步压缩，支持拖拽上传</p>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <div class="feature-item">
              <i class="el-icon-server"></i>
              <h4>后端压缩</h4>
              <p>Java BufferedImage二次压缩，确保统一标准和质量</p>
            </div>
          </el-col>
          <el-col :xs="24" :sm="12" :md="8">
            <div class="feature-item">
              <i class="el-icon-setting"></i>
              <h4>灵活配置</h4>
              <p>支持自定义尺寸、质量、格式等压缩参数</p>
            </div>
          </el-col>
        </el-row>

        <el-divider></el-divider>

        <h3>技术架构</h3>
        <el-row :gutter="20">
          <el-col :xs="24" :sm="12">
            <h4>后端技术栈</h4>
            <ul>
              <li>Spring Boot 2.7.x</li>
              <li>Java 8+</li>
              <li>Maven</li>
              <li>BufferedImage & ImageIO</li>
            </ul>
          </el-col>
          <el-col :xs="24" :sm="12">
            <h4>前端技术栈</h4>
            <ul>
              <li>Vue 2.6.x</li>
              <li>Element UI 2.15.x</li>
              <li>Vuex</li>
              <li>CompressorJS</li>
            </ul>
          </el-col>
        </el-row>

        <el-divider></el-divider>

        <h3>使用说明</h3>
        <el-steps :active="4" direction="vertical" size="small">
          <el-step
            title="选择图片"
            description="支持拖拽或点击上传，支持JPG、PNG、WebP、GIF格式"
          ></el-step>
          <el-step
            title="调整参数"
            description="设置最大尺寸、压缩质量、输出格式等参数"
          ></el-step>
          <el-step
            title="前端压缩"
            description="使用CompressorJS进行初步压缩和预览"
          ></el-step>
          <el-step
            title="后端处理"
            description="服务器进行二次压缩和校验，确保统一标准"
          ></el-step>
        </el-steps>

        <el-divider></el-divider>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "About",
};
</script>

<style scoped>
.about {
  padding: 20px 0;
}

.card-header {
  display: flex;
  align-items: center;
}

.card-header span {
  font-size: 18px;
  font-weight: bold;
}

.card-header i {
  margin-right: 10px;
}

.about-content {
  padding: 20px 0;
}

.about-content h2 {
  text-align: center;
  color: #303133;
  margin-bottom: 20px;
  font-size: 28px;
}

.about-content h3 {
  color: #303133;
  margin: 30px 0 20px 0;
  font-size: 20px;
  border-left: 4px solid #409eff;
  padding-left: 15px;
}

.about-content h4 {
  color: #606266;
  margin: 15px 0 10px 0;
  font-size: 16px;
}

.description {
  text-align: center;
  color: #606266;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.feature-item {
  text-align: center;
  padding: 20px;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.feature-item i {
  font-size: 48px;
  color: #409eff;
  margin-bottom: 15px;
}

.feature-item h4 {
  color: #303133;
  margin-bottom: 10px;
}

.feature-item p {
  color: #606266;
  line-height: 1.5;
}

.about-content ul {
  padding-left: 20px;
  color: #606266;
  line-height: 1.8;
}

.about-content li {
  margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .about-content {
    padding: 10px 0;
  }

  .about-content h2 {
    font-size: 24px;
  }

  .about-content h3 {
    font-size: 18px;
  }

  .feature-item {
    margin-bottom: 15px;
  }
}
</style> 